gtk4.git
15 years agoDocs: start migration guide additions
Matthias Clasen [Thu, 16 Sep 2010 14:49:56 +0000 (10:49 -0400)]
Docs: start migration guide additions

15 years agowidget: Check the widget has an allocation in gtk_widget_draw()
Benjamin Otte [Wed, 15 Sep 2010 01:20:59 +0000 (03:20 +0200)]
widget: Check the widget has an allocation in gtk_widget_draw()

Following the mailing list discussion, require that the widget does not
have a pending size_allocate when calling the draw function.

http://mail.gnome.org/archives/gtk-devel-list/2010-September/msg00214.html
and the associated thread explain this in more detail.

15 years agoAPI: Add gtk_widget_draw()
Benjamin Otte [Sat, 11 Sep 2010 03:19:28 +0000 (05:19 +0200)]
API: Add gtk_widget_draw()

And here's the final patch that all the previous patches were about.

15 years agoAPI: gtk_cell_renderer_render_cairo() => gtk_cell_renderer_render()
Benjamin Otte [Sat, 11 Sep 2010 01:50:47 +0000 (03:50 +0200)]
API: gtk_cell_renderer_render_cairo() => gtk_cell_renderer_render()

15 years agoAPI: Remove gtk_cell_renderer_render()
Benjamin Otte [Sat, 11 Sep 2010 01:31:04 +0000 (03:31 +0200)]
API: Remove gtk_cell_renderer_render()

The next commit will rename gtk_cell_renderer_render_cairo() to
gtk_cell_renderer_render() again

15 years agoAPI: Get rid of gtk_draw_insertion_cursor()
Benjamin Otte [Fri, 10 Sep 2010 23:54:48 +0000 (01:54 +0200)]
API: Get rid of gtk_draw_insertion_cursor()

and rename gtk_cairo_draw_insertion_cursor() to
gtk_draw_insertion_cursor().

15 years agoAPI: Rename gtk_cairo_paint_*() to gtk_paint_*()
Benjamin Otte [Fri, 10 Sep 2010 23:30:27 +0000 (01:30 +0200)]
API: Rename gtk_cairo_paint_*() to gtk_paint_*()

Large patch, but just renaming.
Indentation should still mostly be correct because I took care of
keeping the indentation for this function name.

15 years agoAPI: style: Remove old drawing functions
Benjamin Otte [Fri, 10 Sep 2010 23:10:43 +0000 (01:10 +0200)]
API: style: Remove old drawing functions

15 years agoAPI: widget: Remove the expose event
Benjamin Otte [Fri, 10 Sep 2010 22:42:51 +0000 (00:42 +0200)]
API: widget: Remove the expose event

gtk_widget_send_expose() now calls the draw function.

15 years agoAPI: Remove gtk_container_propagate_expose()
Benjamin Otte [Fri, 10 Sep 2010 19:12:55 +0000 (21:12 +0200)]
API: Remove gtk_container_propagate_expose()

Also, move the documentation to its replacement
gtk_widget_propagate_draw().

15 years agocontainer: Implement gtk_container_propagate_draw() without fallbacks
Benjamin Otte [Fri, 10 Sep 2010 19:03:58 +0000 (21:03 +0200)]
container: Implement gtk_container_propagate_draw() without fallbacks

No more fallbacks to gtk_container_propagate_expose().

15 years agoChange semantics of the draw signal
Benjamin Otte [Tue, 14 Sep 2010 14:42:16 +0000 (16:42 +0200)]
Change semantics of the draw signal

Previously, we tried to move the context's origin to the widget's top
left location, no matter what window the paint was happening on. Now we
only do that for child windows of the widget's window and leave the
context untouched for windows that the widget has created outside its
own hierarchy. In those casses, we also don't clip the context to
the widget's allocation.

Includes fixes to GtkHandlebox for this effect and fixes all known
issues with it.

These semantics assume that gtk_widget_draw() should only draw the parts
of a widget that are inside child windows and not draw stuff that is
located in completely different GdkWindows. In the handlebox case, it
means that it should only draw the handle when it is attached, but not
when it isn't. We'll likely need a special draw function for the
detached handlebox if we want to draw it.

15 years agowidget: Clip drawing to the widget's allocation.
Benjamin Otte [Tue, 14 Sep 2010 14:35:12 +0000 (16:35 +0200)]
widget: Clip drawing to the widget's allocation.

I've seen (and written) quite some widgets (and theme engines) that use
cairo_paint() to draw the background. So avoiding overdraw makes sense.

Also move all that setup into a _gtk_widget_draw_internal() function
that will be used by all functions that can be used by other functions
that draw widgets.

15 years agoiconfactory: Initialize varibale to NULL in failure path
Benjamin Otte [Thu, 9 Sep 2010 21:09:07 +0000 (23:09 +0200)]
iconfactory: Initialize varibale to NULL in failure path

Otherwise we use random memory and that is not good.

15 years agoimage: Add a default case to switch statement to avoid gcc warnings
Benjamin Otte [Thu, 9 Sep 2010 21:08:46 +0000 (23:08 +0200)]
image: Add a default case to switch statement to avoid gcc warnings

15 years agotest: Port offscreen test to draw vfunc
Benjamin Otte [Fri, 10 Sep 2010 22:08:54 +0000 (00:08 +0200)]
test: Port offscreen test to draw vfunc

15 years agogtk-demo: Port offscreen example to draw vfunc
Benjamin Otte [Fri, 10 Sep 2010 21:41:13 +0000 (23:41 +0200)]
gtk-demo: Port offscreen example to draw vfunc

15 years agogtk-demo: Port offscreen example to draw vfunc
Benjamin Otte [Fri, 10 Sep 2010 21:40:58 +0000 (23:40 +0200)]
gtk-demo: Port offscreen example to draw vfunc

15 years agotestgtk: Use draw signal in layout test
Benjamin Otte [Thu, 9 Sep 2010 01:39:43 +0000 (03:39 +0200)]
testgtk: Use draw signal in layout test

15 years agotestgtk: Use draw signal in scrolling test
Benjamin Otte [Thu, 9 Sep 2010 01:33:02 +0000 (03:33 +0200)]
testgtk: Use draw signal in scrolling test

15 years agotestgtk: Use draw signal in cursors example
Benjamin Otte [Thu, 9 Sep 2010 01:12:51 +0000 (03:12 +0200)]
testgtk: Use draw signal in cursors example

15 years agotestgtk: Remove non-existing property from frame constructor
Benjamin Otte [Thu, 9 Sep 2010 01:09:12 +0000 (03:09 +0200)]
testgtk: Remove non-existing property from frame constructor

15 years agotestgtk: Use draw signal in gridded geometry example
Benjamin Otte [Thu, 9 Sep 2010 01:06:53 +0000 (03:06 +0200)]
testgtk: Use draw signal in gridded geometry example

15 years agotestgtk: Make big windows test not use expose events
Benjamin Otte [Thu, 9 Sep 2010 01:01:09 +0000 (03:01 +0200)]
testgtk: Make big windows test not use expose events

Instead, use gdk_window_set_background().

15 years agotestgtk: Use draw signal in resize grips example
Benjamin Otte [Thu, 9 Sep 2010 00:31:38 +0000 (02:31 +0200)]
testgtk: Use draw signal in resize grips example

15 years agox11: When querying window size, ask the wrapper, not ourselves
Benjamin Otte [Thu, 9 Sep 2010 00:14:19 +0000 (02:14 +0200)]
x11: When querying window size, ask the wrapper, not ourselves

15 years agogdk: Make GdkWindow cope better with its surface outliving the window
Benjamin Otte [Thu, 9 Sep 2010 00:13:33 +0000 (02:13 +0200)]
gdk: Make GdkWindow cope better with its surface outliving the window

Make extra sure we release the surface properly. Also make sure that the
released surface doesn't keep any references to us.

15 years agotests: Use draw vfunc in print-editor
Benjamin Otte [Thu, 9 Sep 2010 00:12:59 +0000 (02:12 +0200)]
tests: Use draw vfunc in print-editor

15 years agotestoffscreen: Connect to draw signal
Benjamin Otte [Wed, 8 Sep 2010 23:52:14 +0000 (01:52 +0200)]
testoffscreen: Connect to draw signal

15 years agotests: Use draw signal in testinput
Benjamin Otte [Wed, 8 Sep 2010 23:16:28 +0000 (01:16 +0200)]
tests: Use draw signal in testinput

15 years agotestpixbuf-save: Use the draw signal
Benjamin Otte [Wed, 8 Sep 2010 23:15:14 +0000 (01:15 +0200)]
testpixbuf-save: Use the draw signal

15 years agotestpixbuf-scale: Connect to draw signal
Benjamin Otte [Wed, 8 Sep 2010 23:01:35 +0000 (01:01 +0200)]
testpixbuf-scale: Connect to draw signal

15 years agopixbuf-demo: Use draw signal
Benjamin Otte [Wed, 8 Sep 2010 22:58:30 +0000 (00:58 +0200)]
pixbuf-demo: Use draw signal

15 years agogtk-demo: Use draw signal in color selection demo
Benjamin Otte [Wed, 8 Sep 2010 22:57:05 +0000 (00:57 +0200)]
gtk-demo: Use draw signal in color selection demo

15 years agotesttooltips: Connect to draw signal
Benjamin Otte [Wed, 8 Sep 2010 22:33:57 +0000 (00:33 +0200)]
testtooltips: Connect to draw signal

15 years agotesttooltips: Don't call gdk_window_get_pointer() in expose events
Benjamin Otte [Wed, 8 Sep 2010 22:32:40 +0000 (00:32 +0200)]
testtooltips: Don't call gdk_window_get_pointer() in expose events

15 years agotestgtk: Connect to draw signal in "rotated text" example
Benjamin Otte [Wed, 8 Sep 2010 20:34:28 +0000 (22:34 +0200)]
testgtk: Connect to draw signal in "rotated text" example

15 years agotestgtk: Connect to draw signals in "composited window" example
Benjamin Otte [Wed, 8 Sep 2010 20:31:06 +0000 (22:31 +0200)]
testgtk: Connect to draw signals in "composited window" example

15 years agotestgtk: Connect to draw signal in alpha test
Benjamin Otte [Wed, 8 Sep 2010 20:25:50 +0000 (22:25 +0200)]
testgtk: Connect to draw signal in alpha test

Test still behaves weird, no idea why though.

15 years agotests: Connect to draw signal in testimage
Benjamin Otte [Wed, 8 Sep 2010 20:23:18 +0000 (22:23 +0200)]
tests: Connect to draw signal in testimage

15 years agotests: Connect to draw signal in testoffscreenwindow
Benjamin Otte [Wed, 8 Sep 2010 20:20:34 +0000 (22:20 +0200)]
tests: Connect to draw signal in testoffscreenwindow

15 years agotests: Connect to draw signal in testellipsise
Benjamin Otte [Wed, 8 Sep 2010 20:17:48 +0000 (22:17 +0200)]
tests: Connect to draw signal in testellipsise

The test seems broken, not sure why.

15 years agotestcairo: Connect to draw signal
Benjamin Otte [Wed, 8 Sep 2010 20:12:51 +0000 (22:12 +0200)]
testcairo: Connect to draw signal

15 years agoperf: Connect to draw signal
Benjamin Otte [Wed, 8 Sep 2010 20:08:42 +0000 (22:08 +0200)]
perf: Connect to draw signal

15 years agoimcontextxim: Connect to draw signal
Benjamin Otte [Wed, 8 Sep 2010 20:03:50 +0000 (22:03 +0200)]
imcontextxim: Connect to draw signal

15 years agogtk-demo: Connect to draw signal in rotated-text
Benjamin Otte [Wed, 8 Sep 2010 19:57:18 +0000 (21:57 +0200)]
gtk-demo: Connect to draw signal in rotated-text

15 years agogtk-demo: Connect to draw signal in pixbufs example
Benjamin Otte [Wed, 8 Sep 2010 19:53:26 +0000 (21:53 +0200)]
gtk-demo: Connect to draw signal in pixbufs example

15 years agogtk-demo: Connet to draw signal in drawingarea example
Benjamin Otte [Wed, 8 Sep 2010 19:50:16 +0000 (21:50 +0200)]
gtk-demo: Connet to draw signal in drawingarea example

15 years agoprintunixdialog: Connect to draw vfunc
Benjamin Otte [Wed, 8 Sep 2010 19:35:03 +0000 (21:35 +0200)]
printunixdialog: Connect to draw vfunc

15 years agoprintunixdialog: Connect to draw signal for collate callback
Benjamin Otte [Wed, 8 Sep 2010 19:27:34 +0000 (21:27 +0200)]
printunixdialog: Connect to draw signal for collate callback

15 years agodnd-quartz: Connect to draw func for dnd hilight
Benjamin Otte [Wed, 8 Sep 2010 19:24:01 +0000 (21:24 +0200)]
dnd-quartz: Connect to draw func for dnd hilight

15 years agodnd: Connect to raw func for drag hilight
Benjamin Otte [Wed, 8 Sep 2010 19:21:59 +0000 (21:21 +0200)]
dnd: Connect to raw func for drag hilight

15 years agocolorsel: Connect to draw signal
Benjamin Otte [Wed, 8 Sep 2010 19:07:31 +0000 (21:07 +0200)]
colorsel: Connect to draw signal

15 years agofilechooserentry: Connect to draw event
Benjamin Otte [Wed, 8 Sep 2010 18:56:36 +0000 (20:56 +0200)]
filechooserentry: Connect to draw event

15 years agocolorbutton: Connect to draw event
Benjamin Otte [Wed, 8 Sep 2010 15:58:45 +0000 (17:58 +0200)]
colorbutton: Connect to draw event

15 years agonotebook: Connect to draw signal
Benjamin Otte [Wed, 8 Sep 2010 15:54:15 +0000 (17:54 +0200)]
notebook: Connect to draw signal

15 years agotooltip: Connect to draw signal
Benjamin Otte [Wed, 8 Sep 2010 15:09:12 +0000 (17:09 +0200)]
tooltip: Connect to draw signal

15 years agotoolitemgroup: Connect to draw signal
Benjamin Otte [Wed, 8 Sep 2010 15:06:07 +0000 (17:06 +0200)]
toolitemgroup: Connect to draw signal

15 years agoassistant: Port to draw vfunc
Benjamin Otte [Wed, 8 Sep 2010 14:37:43 +0000 (16:37 +0200)]
assistant: Port to draw vfunc

15 years agotrayicon: Port to draw vfunc
Benjamin Otte [Wed, 8 Sep 2010 14:33:14 +0000 (16:33 +0200)]
trayicon: Port to draw vfunc

15 years agowindow: Port to draw vfunc
Benjamin Otte [Wed, 8 Sep 2010 14:09:24 +0000 (16:09 +0200)]
window: Port to draw vfunc

15 years agowindow: Remove hack to set background
Benjamin Otte [Wed, 8 Sep 2010 14:08:46 +0000 (16:08 +0200)]
window: Remove hack to set background

I can't see this having any effect in current code, but who knows...

15 years agoexpander: Port to draw vfunc
Benjamin Otte [Wed, 8 Sep 2010 14:01:32 +0000 (16:01 +0200)]
expander: Port to draw vfunc

15 years agoframe: Port to draw vfunc
Benjamin Otte [Wed, 8 Sep 2010 13:40:21 +0000 (15:40 +0200)]
frame: Port to draw vfunc

15 years agoframe: Remove unneeded is_drawable() check
Benjamin Otte [Wed, 8 Sep 2010 13:32:50 +0000 (15:32 +0200)]
frame: Remove unneeded is_drawable() check

15 years agoAPI: checkbutton: Port to draw vfunc
Benjamin Otte [Wed, 8 Sep 2010 13:29:24 +0000 (15:29 +0200)]
API: checkbutton: Port to draw vfunc

Requires changing the API of the draw_indicator vfunc.

15 years agoradiobutton: Remove redundant is_drawable() check
Benjamin Otte [Wed, 8 Sep 2010 13:10:56 +0000 (15:10 +0200)]
radiobutton: Remove redundant is_drawable() check

15 years agocheckbutton: Remove redundant is_drawable() check
Benjamin Otte [Wed, 8 Sep 2010 13:08:59 +0000 (15:08 +0200)]
checkbutton: Remove redundant is_drawable() check

15 years agocheckbutton: Remove excessive is_drawable() check
Benjamin Otte [Wed, 8 Sep 2010 12:55:53 +0000 (14:55 +0200)]
checkbutton: Remove excessive is_drawable() check

15 years agohandlebox: Port to draw vfunc
Benjamin Otte [Wed, 8 Sep 2010 12:54:15 +0000 (14:54 +0200)]
handlebox: Port to draw vfunc

15 years agohandlebox: Simplify painting code
Benjamin Otte [Wed, 8 Sep 2010 12:40:22 +0000 (14:40 +0200)]
handlebox: Simplify painting code

15 years agohandlebox: Don't draw outside of expose events
Benjamin Otte [Wed, 8 Sep 2010 12:30:30 +0000 (14:30 +0200)]
handlebox: Don't draw outside of expose events

We do a queue_draw() via queue_resize() here, so everything's fine.

15 years agobutton: Port to draw vfunc
Benjamin Otte [Tue, 7 Sep 2010 22:23:04 +0000 (00:23 +0200)]
button: Port to draw vfunc

Also port togglebutton, they use the same paint function.

15 years agobutton: Remove is_drawable() check
Benjamin Otte [Tue, 7 Sep 2010 22:12:35 +0000 (00:12 +0200)]
button: Remove is_drawable() check

It's already done in the expose function

15 years agotearoffmenuitem: remove is_drawable() check
Benjamin Otte [Tue, 14 Sep 2010 11:22:29 +0000 (13:22 +0200)]
tearoffmenuitem: remove is_drawable() check

15 years agoAPI: checkmenuitem: Port to draw vfunc
Benjamin Otte [Tue, 7 Sep 2010 22:03:42 +0000 (00:03 +0200)]
API: checkmenuitem: Port to draw vfunc

Requires changing the draw_indicator vfunc to take a cairo_t.

15 years agotearoffmenuitem: Port to draw vfunc
Benjamin Otte [Tue, 7 Sep 2010 21:16:56 +0000 (23:16 +0200)]
tearoffmenuitem: Port to draw vfunc

15 years agotearoffmenuitem: Don't clear the window, it should be clear already
Benjamin Otte [Tue, 7 Sep 2010 20:45:21 +0000 (22:45 +0200)]
tearoffmenuitem: Don't clear the window, it should be clear already

15 years agotearoffmenuitem: Merge paint() into expose()
Benjamin Otte [Tue, 7 Sep 2010 20:12:33 +0000 (22:12 +0200)]
tearoffmenuitem: Merge paint() into expose()

15 years agomenuitem: Remove is_drawable() check
Benjamin Otte [Tue, 14 Sep 2010 11:19:16 +0000 (13:19 +0200)]
menuitem: Remove is_drawable() check

15 years agomenuitem: Port to draw vfunc
Benjamin Otte [Tue, 7 Sep 2010 20:10:15 +0000 (22:10 +0200)]
menuitem: Port to draw vfunc

15 years agomenuitem: Move paint function into expose function
Benjamin Otte [Tue, 7 Sep 2010 18:33:39 +0000 (20:33 +0200)]
menuitem: Move paint function into expose function

15 years agocombobox: Port to draw vfunc
Benjamin Otte [Tue, 7 Sep 2010 18:17:39 +0000 (20:17 +0200)]
combobox: Port to draw vfunc

15 years agoeventbox: Port to draw vfunc
Benjamin Otte [Tue, 7 Sep 2010 18:13:50 +0000 (20:13 +0200)]
eventbox: Port to draw vfunc

15 years agoeventbox: Merge paint function into expose function
Benjamin Otte [Tue, 7 Sep 2010 17:29:03 +0000 (19:29 +0200)]
eventbox: Merge paint function into expose function

15 years agoscrolledwindow: Port to draw vfunc
Benjamin Otte [Tue, 7 Sep 2010 17:18:46 +0000 (19:18 +0200)]
scrolledwindow: Port to draw vfunc

15 years agoscrolledwindow: Move paint function into expose handler
Benjamin Otte [Tue, 7 Sep 2010 14:59:32 +0000 (16:59 +0200)]
scrolledwindow: Move paint function into expose handler

Also remove the is_drawable() check. It will not be needed once we have
the draw vfunc.

15 years agoviewport: No need to check if the widget is drawable anymore
Benjamin Otte [Tue, 14 Sep 2010 11:11:53 +0000 (13:11 +0200)]
viewport: No need to check if the widget is drawable anymore

15 years agoviewport: Port to draw vfunc
Benjamin Otte [Tue, 7 Sep 2010 14:56:46 +0000 (16:56 +0200)]
viewport: Port to draw vfunc

15 years agoviewport: Pass sizes explicitly to paint functions
Benjamin Otte [Tue, 7 Sep 2010 14:48:29 +0000 (16:48 +0200)]
viewport: Pass sizes explicitly to paint functions

15 years agoviewport: Merge gtk_viewport_paint() into expose function
Benjamin Otte [Tue, 7 Sep 2010 14:41:57 +0000 (16:41 +0200)]
viewport: Merge gtk_viewport_paint() into expose function

15 years agoviewport: Don't paint stuff in realize handler
Benjamin Otte [Tue, 7 Sep 2010 14:37:27 +0000 (16:37 +0200)]
viewport: Don't paint stuff in realize handler

15 years agonotebook: Port to draw vfunc
Benjamin Otte [Tue, 7 Sep 2010 00:39:44 +0000 (02:39 +0200)]
notebook: Port to draw vfunc

15 years agonotebook: The drawable check is not necessary
Benjamin Otte [Tue, 7 Sep 2010 00:28:26 +0000 (02:28 +0200)]
notebook: The drawable check is not necessary

Large patch, but that's only indentation.

15 years agonotebook: Draw tabs and arrows with Cairo
Benjamin Otte [Mon, 6 Sep 2010 23:33:25 +0000 (01:33 +0200)]
notebook: Draw tabs and arrows with Cairo

Includes a fix to only draw the current page once during a drag
operation.

15 years agonotebook: Simplify draw_tab function a bit
Benjamin Otte [Mon, 6 Sep 2010 23:09:41 +0000 (01:09 +0200)]
notebook: Simplify draw_tab function a bit

Don't keep lots of local variables that are only used once.

15 years agonotebook: remove check for is_drawable
Benjamin Otte [Mon, 6 Sep 2010 21:20:03 +0000 (23:20 +0200)]
notebook: remove check for is_drawable

When we reach that code, the widget will always be drawable

15 years agonotebook: Reorder expose function in preparation of draw vfunc
Benjamin Otte [Mon, 6 Sep 2010 21:18:14 +0000 (23:18 +0200)]
notebook: Reorder expose function in preparation of draw vfunc

15 years agonotebook: Use a for loop when iterating over a list
Benjamin Otte [Mon, 6 Sep 2010 21:15:56 +0000 (23:15 +0200)]
notebook: Use a for loop when iterating over a list

15 years agonotebook: Draw focus when drawing tab
Benjamin Otte [Mon, 6 Sep 2010 21:12:32 +0000 (23:12 +0200)]
notebook: Draw focus when drawing tab

Instead of using a special function, draw the focus of a tab when the
tab actually is painted. Simplifies the code quite a bit.